//
//  OneViewController.m
//  CLImagePicker
//
//  Created by Criss on 2017/4/24.
//  Copyright © 2017年 Criss. All rights reserved.
//

#import "OneViewController.h"
#import "UIButton+Addition.h"

@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor yellowColor];
    
    UIButton *btn = [UIButton buttonWithNormalTitle:@"导入" titleColor:[UIColor blackColor] superView:self.view addAction:^(UIButton * _Nullable sender) {
        NSArray *imageUrls;
        sender.selected = !sender.isSelected;
        if (sender.isSelected) {
            imageUrls = @[@"http://pic23.nipic.com/20120806/10504822_150106691000_2.jpg",@"http://pic9.nipic.com/20100906/1295091_134639124058_2.jpg"];
        }else {
            imageUrls = @[@"http://pic.58pic.com/58pic/14/27/45/71r58PICmDM_1024.jpg", @"http://www.zhiyinlady.com/d/file/20170322/2e3da7aed9d6744388f5497651def758.jpg", @"http://wow.tgbus.com/uploadfiles_2396/201012/2010120115374742.jpg"/*, @"http://www.51modo.cc/upload/kindeditor/image/20150324/20150324155751_77766.jpg"*/];
        }
        if (self.btnClickBlock) {
            [self.navigationController popViewControllerAnimated:YES];
            self.btnClickBlock(imageUrls, @[@"你好", @"我好", @"大家好", @"真的好", @"确实好", @"好的不得了"]);
        }
    }];
    btn.center = self.view.center;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
